Open
Conversation
…etection branch commit - Updated the go-auth0 dependency from v1.33.0 to v1.33.1-0.20260211120643-ac1cfcb90495. - This change ensures compatibility with the latest features and fixes provided by the go-auth0 library.
- Introduced new commands for managing bot detection settings, including: - `bot-detection show`: Displays current bot detection settings. - `bot-detection update`: Updates bot detection settings with user-defined parameters. - Added `GetBotDetection` and `UpdateBotDetection` methods to the AttackProtectionAPI interface for retrieving and updating settings. - Implemented a new `botDetectionView` struct for rendering bot detection settings in the CLI. - Enhanced the attack protection command structure to include bot detection management.
- Introduced new test cases for bot detection functionality. - Added tests for both showing and updating bot detection settings. - Ensured that the output contains relevant fields. - These changes enhance the coverage of the attack protection feature.
…ated file - Created a new YAML file for integration test cases specifically for attack protection features, including bot detection. - Moved existing test cases related to attack protection from `test-cases.yaml` to `attack-protection-test-cases.yaml` for better organization and clarity. - Each test case verifies the expected output and exit codes for various attack protection commands, ensuring functionality and reliability of the bot detection feature.
- Updated `auth0_protection.md` to include a link to the new bot detection management commands. - Created `auth0_protection_bot-detection.md` to describe bot detection features and settings. - Added `auth0_protection_bot-detection_show.md` for displaying current bot detection settings. - Added `auth0_protection_bot-detection_update.md` for updating bot detection settings.
- Introduced a new function `initializeManagementClientV2` to create a management client using the v2 API. - This function utilizes the `github.com/auth0/go-auth0/v2` package for improved management capabilities. - Updated `go.mod` and `go.sum` to include the v2 dependency.
- Added support for v2 management client in the attack protection module. - Added the AttackProtectionBotDetectionAPIV2 interface to use v2 types. - Refactored bot detection show command to utilize new v2 API methods. - Adjusted display functions to handle v2 bot detection response types. - Enhanced the CLI to initialize and use the v2 management client.
…h0-v2 - Updated the `updateBotDetectionCmdRun` function to utilize the new go-auth0 v2 for bot detection settings. - Introduced a new `stringPtr` utility function to handle string-derived pointer conversions. - Added tests for `stringPtr` to ensure correct behavior with nil and custom string types. - Refactored rendering functions to accommodate changes in the bot detection settings response structure. - Improved user prompts for bot detection configuration options.
- Updated go-auth0 dependency from v1.33.1 to v1.33.0 in go.mod and go.sum
- Renamed variable `bd` to `current` for clarity in the `updateBotDetectionCmdRun` function. - Removed the `noInputValueFlagSet` function and its associated logic to streamline command behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Adds bot detection management commands to the Auth0 CLI, allowing users to view and configure bot detection settings directly from the command line.
New Commands:
auth0 protection bot-detection show- Display current bot detection settingsauth0 protection bot-detection update- Update bot detection settingsTechnical Updates:
📚 References
🔬 Testing
Automated Tests:
stringPtr)test/integration/attack-protection-test-cases.yamlManual Testing:
📝 Checklist